'''
用户类
'''
from mongoengine import Document, BooleanField, IntegerField, DateTimeField, StringField, ListField, EmbeddedDocumentField

class User(Document):

    id = IntegerField(required=True)
    user_name = StringField(required=True)
    account = StringField(required=True)
    password = StringField(required=True)
    register_time = DateTimeField(default=None)
    description = StringField(required=True)
    status = BooleanField(default=True)

    meta = {
        'collection': 'user',
        'db_alias': 'painter'
    }